/* 通讯录样式 */
.contacts-container {
    display: flex;
    height: calc(100vh - 140px);
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.contacts-sidebar {
    width: 320px;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    background-color: #fafafa;
}

.contacts-search {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contacts-search input {
    flex: 1;
    height: 40px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    padding: 0 16px;
    font-size: 14px;
}

.contacts-search .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4a7aff;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.contacts-search .btn-icon:hover {
    background-color: #3a60dd;
}

.contacts-filter {
    display: flex;
    overflow-x: auto;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.filter-item {
    padding: 6px 14px;
    border-radius: 16px;
    background-color: #f0f0f0;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-item:hover {
    background-color: #e6e6e6;
}

.filter-item.active {
    background-color: #4a7aff;
    color: white;
}

.contacts-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 8px;
    margin: 4px 8px;
    transition: background-color 0.2s;
    position: relative;
}

.contact-item.active {
    background-color: #e6f7ff;
}

.contact-item:hover {
    background-color: #f5f5f5;
}

.contact-avatar {
    position: relative;
    margin-right: 14px;
}

.contact-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.status-online {
    background-color: #52c41a;
}

.status-offline {
    background-color: #d9d9d9;
}

.status-busy {
    background-color: #f5222d;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.contact-status {
    font-size: 13px;
    color: #999;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
    color: #999;
    text-align: center;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #d9d9d9;
}

/* 联系人详情样式 */
.contact-details {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.contact-header {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.contact-header .contact-avatar {
    margin-right: 20px;
}

.contact-header .contact-avatar img {
    width: 80px;
    height: 80px;
}

.contact-header .contact-info {
    display: flex;
    flex-direction: column;
}

.contact-header .contact-name {
    font-size: 24px;
    margin-bottom: 8px;
}

.contact-header .contact-status {
    display: inline-block;
    margin-bottom: 10px;
}

.contact-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    background-color: #f0f0f0;
    color: #666;
}

.tag-family {
    background-color: #efdbff;
    color: #722ed1;
}

.tag-friend {
    background-color: #d6f5d6;
    color: #389e0d;
}

.tag-colleague {
    background-color: #e6f7ff;
    color: #1890ff;
}

.contact-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 16px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s;
    flex: 1;
}

.action-btn i {
    font-size: 20px;
    color: #4a7aff;
}

.action-btn span {
    font-size: 14px;
    color: #666;
}

.action-btn:hover i, .action-btn:hover span {
    color: #1854d9;
}

.contact-section {
    margin-bottom: 24px;
    background-color: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 18px;
    margin-bottom: 16px;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 8px;
    color: #4a7aff;
}

.info-item {
    display: flex;
    margin-bottom: 12px;
    font-size: 15px;
}

.info-label {
    width: 100px;
    color: #999;
}

.info-value {
    flex: 1;
    color: #333;
}

/* 联系人更多操作区域 */
.contact-more-actions {
    margin-top: auto;
    padding-top: 20px;
}

.more-actions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.more-action-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #333;
    background-color: #f9f9f9;
}

.more-action-item:hover {
    background-color: #f0f0f0;
}

.more-action-item i {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #4a7aff;
}

.more-action-item.danger {
    color: #ff4d4f;
}

.more-action-item.danger i {
    color: #ff4d4f;
}

.more-action-item.danger:hover {
    background-color: #fff1f0;
}

/* 朋友圈预览样式 */
.moments-preview {
    background-color: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.moments-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.moments-preview-title {
    font-size: 18px;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.moments-preview-title i {
    margin-right: 8px;
    color: #4a7aff;
}

.view-all-moments {
    font-size: 14px;
    color: #4a7aff;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.view-all-moments i {
    margin-left: 4px;
    font-size: 12px;
}

.moments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.moment-item {
    border-radius: 8px;
    overflow: hidden;
    background-color: #f9f9f9;
    transition: transform 0.2s;
    cursor: pointer;
}

.moment-item:hover {
    transform: translateY(-2px);
}

.moment-content {
    padding: 12px;
}

.moment-text {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.moment-time {
    font-size: 12px;
    color: #999;
}

.moment-media {
    display: flex;
    height: 120px;
    overflow: hidden;
}

.moment-media-item {
    flex: 1;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.moment-media-item + .moment-media-item {
    margin-left: 2px;
}

.moment-media-more {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 20px;
}

/* 朋友圈详情弹窗 */
.moment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

.moment-modal-content {
    background-color: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.moment-modal-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.moment-modal-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
}

.moment-modal-title img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
}

.moment-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.moment-modal-close:hover {
    background-color: #f0f0f0;
}

.moment-modal-body {
    flex: 1;
    padding: 16px;
}

.moment-modal-content-text {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.moment-modal-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.moment-modal-image {
    width: calc(33.33% - 6px);
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.moment-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.moment-modal-image img:hover {
    transform: scale(1.05);
}

.moment-modal-video {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.moment-modal-video video {
    width: 100%;
}

.moment-modal-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    background-color: #fafafa;
}

.moment-modal-time {
    font-size: 14px;
    color: #999;
}

.moment-modal-actions {
    display: flex;
    gap: 16px;
}

.moment-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.moment-action-btn:hover {
    color: #4a7aff;
}

.moment-action-btn.liked {
    color: #4a7aff;
}

.moment-modal-comments {
    margin-top: 16px;
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.moment-modal-comments-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    color: #333;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-item {
    padding: 8px 12px;
    background-color: #f9f9f9;
    border-radius: 6px;
    font-size: 14px;
}

.comment-author {
    font-weight: 500;
    color: #4a7aff;
}

.empty-comments {
    text-align: center;
    padding: 20px 0;
    color: #999;
    font-size: 14px;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .contacts-container {
        flex-direction: column;
        height: auto;
    }
    
    .contacts-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        max-height: 300px;
    }
    
    .contact-details {
        padding: 15px;
    }
    
    .contact-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-header .contact-avatar {
        margin-bottom: 15px;
    }
    
    .contact-actions {
        flex-wrap: wrap;
    }
    
    .moment-media {
        height: 100px;
    }
    
    .moment-modal-image {
        width: calc(50% - 4px);
    }
}

/* Add Friend Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

.modal-content {
    background-color: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-body {
    padding: 16px;
}

.search-friend-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 16px;
}

.search-friend-tab {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    position: relative;
}

.search-friend-tab.active {
    color: #4a7aff;
    font-weight: 500;
}

.search-friend-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #4a7aff;
}

.search-friend-content {
    margin-bottom: 16px;
}

.input-with-button {
    display: flex;
    gap: 8px;
}

.input-with-button input {
    flex: 1;
}

.search-results {
    margin-top: 20px;
}

.loading-indicator,
.search-error,
.empty-results,
.search-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    text-align: center;
    color: #666;
}

.loading-indicator i,
.search-error i,
.empty-results i,
.search-success i {
    font-size: 32px;
    margin-bottom: 10px;
}

.search-error i {
    color: #f5222d;
}

.empty-results i {
    color: #bbb;
}

.search-success i {
    color: #52c41a;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background-color: #f5f5f5;
    margin-bottom: 10px;
}

.user-avatar {
    margin-right: 12px;
}

.user-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    padding-right: 0;
    flex: 1;
}

.user-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.user-details {
    font-size: 13px;
    color: #666;
}

.user-email,
.user-phone {
    margin-top: 2px;
}

.user-actions {
    margin-left: 10px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .search-result-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .user-actions {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .user-actions button {
        width: 100%;
    }
} 